3.1.48 \(\int \frac {d+e x}{x (b x+c x^2)} \, dx\)

Optimal. Leaf size=43 \[ -\frac {\log (x) (c d-b e)}{b^2}+\frac {(c d-b e) \log (b+c x)}{b^2}-\frac {d}{b x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {765} \begin {gather*} -\frac {\log (x) (c d-b e)}{b^2}+\frac {(c d-b e) \log (b+c x)}{b^2}-\frac {d}{b x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)/(x*(b*x + c*x^2)),x]

[Out]

-(d/(b*x)) - ((c*d - b*e)*Log[x])/b^2 + ((c*d - b*e)*Log[b + c*x])/b^2

Rule 765

Int[((e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand
Integrand[(e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, e, f, g, m}, x] && IntegerQ[p] && (
GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {align*} \int \frac {d+e x}{x \left (b x+c x^2\right )} \, dx &=\int \left (\frac {d}{b x^2}+\frac {-c d+b e}{b^2 x}-\frac {c (-c d+b e)}{b^2 (b+c x)}\right ) \, dx\\ &=-\frac {d}{b x}-\frac {(c d-b e) \log (x)}{b^2}+\frac {(c d-b e) \log (b+c x)}{b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 42, normalized size = 0.98 \begin {gather*} \frac {\log (x) (b e-c d)}{b^2}+\frac {(c d-b e) \log (b+c x)}{b^2}-\frac {d}{b x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)/(x*(b*x + c*x^2)),x]

[Out]

-(d/(b*x)) + ((-(c*d) + b*e)*Log[x])/b^2 + ((c*d - b*e)*Log[b + c*x])/b^2

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {d+e x}{x \left (b x+c x^2\right )} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(d + e*x)/(x*(b*x + c*x^2)),x]

[Out]

IntegrateAlgebraic[(d + e*x)/(x*(b*x + c*x^2)), x]

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 41, normalized size = 0.95 \begin {gather*} \frac {{\left (c d - b e\right )} x \log \left (c x + b\right ) - {\left (c d - b e\right )} x \log \relax (x) - b d}{b^{2} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x/(c*x^2+b*x),x, algorithm="fricas")

[Out]

((c*d - b*e)*x*log(c*x + b) - (c*d - b*e)*x*log(x) - b*d)/(b^2*x)

________________________________________________________________________________________

giac [A]  time = 0.24, size = 53, normalized size = 1.23 \begin {gather*} -\frac {{\left (c d - b e\right )} \log \left ({\left | x \right |}\right )}{b^{2}} - \frac {d}{b x} + \frac {{\left (c^{2} d - b c e\right )} \log \left ({\left | c x + b \right |}\right )}{b^{2} c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x/(c*x^2+b*x),x, algorithm="giac")

[Out]

-(c*d - b*e)*log(abs(x))/b^2 - d/(b*x) + (c^2*d - b*c*e)*log(abs(c*x + b))/(b^2*c)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 51, normalized size = 1.19 \begin {gather*} \frac {e \ln \relax (x )}{b}-\frac {e \ln \left (c x +b \right )}{b}-\frac {c d \ln \relax (x )}{b^{2}}+\frac {c d \ln \left (c x +b \right )}{b^{2}}-\frac {d}{b x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)/x/(c*x^2+b*x),x)

[Out]

-1/b*ln(c*x+b)*e+1/b^2*ln(c*x+b)*c*d-d/b/x+1/b*ln(x)*e-1/b^2*ln(x)*c*d

________________________________________________________________________________________

maxima [A]  time = 0.85, size = 43, normalized size = 1.00 \begin {gather*} \frac {{\left (c d - b e\right )} \log \left (c x + b\right )}{b^{2}} - \frac {{\left (c d - b e\right )} \log \relax (x)}{b^{2}} - \frac {d}{b x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x/(c*x^2+b*x),x, algorithm="maxima")

[Out]

(c*d - b*e)*log(c*x + b)/b^2 - (c*d - b*e)*log(x)/b^2 - d/(b*x)

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 33, normalized size = 0.77 \begin {gather*} -\frac {d}{b\,x}-\frac {2\,\mathrm {atanh}\left (\frac {2\,c\,x}{b}+1\right )\,\left (b\,e-c\,d\right )}{b^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*x)/(x*(b*x + c*x^2)),x)

[Out]

- d/(b*x) - (2*atanh((2*c*x)/b + 1)*(b*e - c*d))/b^2

________________________________________________________________________________________

sympy [B]  time = 0.37, size = 95, normalized size = 2.21 \begin {gather*} - \frac {d}{b x} + \frac {\left (b e - c d\right ) \log {\left (x + \frac {b^{2} e - b c d - b \left (b e - c d\right )}{2 b c e - 2 c^{2} d} \right )}}{b^{2}} - \frac {\left (b e - c d\right ) \log {\left (x + \frac {b^{2} e - b c d + b \left (b e - c d\right )}{2 b c e - 2 c^{2} d} \right )}}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/x/(c*x**2+b*x),x)

[Out]

-d/(b*x) + (b*e - c*d)*log(x + (b**2*e - b*c*d - b*(b*e - c*d))/(2*b*c*e - 2*c**2*d))/b**2 - (b*e - c*d)*log(x
 + (b**2*e - b*c*d + b*(b*e - c*d))/(2*b*c*e - 2*c**2*d))/b**2

________________________________________________________________________________________